home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / examples / xlib / useful < prev    next >
Encoding:
Text File  |  1991-08-05  |  560 b   |  35 lines

  1. ;;; -*-Scheme-*-
  2.  
  3. (require 'xlib)
  4.  
  5. (define dpy
  6.   (open-display))
  7.  
  8. (define (f)
  9.   (display-wait-output dpy #t))
  10.  
  11. (define root
  12.   (display-root-window dpy))
  13.  
  14. (define cmap
  15.   (display-colormap dpy))
  16.  
  17. (define white (white-pixel dpy))
  18. (define black (black-pixel dpy))
  19.  
  20. (define rgb-white (query-color cmap white))
  21. (define rgb-black (query-color cmap black))
  22.  
  23. (define win
  24.   (create-window
  25.     'parent root
  26.     'width 300 'height 300
  27.     'background-pixel white))
  28.  
  29. (define gc
  30.   (create-gcontext
  31.     'window win
  32.     'background white 'foreground black))
  33.  
  34. (map-window win)
  35.